<?php

namespace App\Http\Controllers\Wechat;

use Laravel\Lumen\Routing\Controller as BaseController;


class MessageEventController extends BaseController
{
    public static function handle( $message )
    {
        switch ( $message->Event ) {
            case 'subscribe':
                return "终于等到你...\n工大A梦伴你同行";
                break;
            case 'unsubscribe':
                return null;
                break;
            case 'SCAN':
                return MessageEventScanController::handle($message);
                break;
            case 'CLICK':
                return MessageEventClickController::handle( $message );
                break;
            case 'LOCATION':
                return null;
                break;
            case 'VIEW':
                return null;
                break;
            default:
                return null;
                break;
        }
    }
}